package com.gla.giliair.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * seat
 * @author 
 */
@ApiModel(value="com.gla.giliair.entity.Seat动态座位表")
@Data
public class Seat implements Serializable {
    /**
     * 动态座位id
     */
    @ApiModelProperty(value="动态座位id")
    private Long seatId;

    /**
     * 座位状态：0->未被占用；1->被占用；2->被冻结
     */
    @ApiModelProperty(value="座位状态：0->未被占用；1->被占用；2->被冻结")
    private Integer seatState;

    /**
     * 静态座位外键id
     */
    @ApiModelProperty(value="静态座位外键id")
    private Long staticSeatId;

    /**
     * 座位号
     */
    @ApiModelProperty(value="座位号")
    private String seatNumber;

    /**
     * 座位类型：0->经济舱；1->商务舱；2->头等舱
     */
    @ApiModelProperty(value="座位类型：0->经济舱；1->商务舱；2->头等舱")
    private Integer seatType;

    /**
     * 航班外键id
     */
    @ApiModelProperty(value="航班外键id")
    private Long flightId;

    /**
     * 订单外键id
     */
    @ApiModelProperty(value="订单外键id")
    private Long orderId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Seat other = (Seat) that;
        return (this.getSeatId() == null ? other.getSeatId() == null : this.getSeatId().equals(other.getSeatId()))
            && (this.getSeatState() == null ? other.getSeatState() == null : this.getSeatState().equals(other.getSeatState()))
            && (this.getStaticSeatId() == null ? other.getStaticSeatId() == null : this.getStaticSeatId().equals(other.getStaticSeatId()))
            && (this.getSeatNumber() == null ? other.getSeatNumber() == null : this.getSeatNumber().equals(other.getSeatNumber()))
            && (this.getSeatType() == null ? other.getSeatType() == null : this.getSeatType().equals(other.getSeatType()))
            && (this.getFlightId() == null ? other.getFlightId() == null : this.getFlightId().equals(other.getFlightId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSeatId() == null) ? 0 : getSeatId().hashCode());
        result = prime * result + ((getSeatState() == null) ? 0 : getSeatState().hashCode());
        result = prime * result + ((getStaticSeatId() == null) ? 0 : getStaticSeatId().hashCode());
        result = prime * result + ((getSeatNumber() == null) ? 0 : getSeatNumber().hashCode());
        result = prime * result + ((getSeatType() == null) ? 0 : getSeatType().hashCode());
        result = prime * result + ((getFlightId() == null) ? 0 : getFlightId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", seatId=").append(seatId);
        sb.append(", seatState=").append(seatState);
        sb.append(", staticSeatId=").append(staticSeatId);
        sb.append(", seatNumber=").append(seatNumber);
        sb.append(", seatType=").append(seatType);
        sb.append(", flightId=").append(flightId);
        sb.append(", orderId=").append(orderId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}